﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteWithControlAccess.Master"
    Inherits="System.Web.Mvc.ViewPage<ProjetoComperio.DataLayer.Entities.Contribution>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Projetos mais comentados
    </h2>
    <div class="Grid">
        <%= Html.Grid(ViewData["GridSource"] as List<ProjetoComperio.DataLayer.Entities.Project>).Columns(
           column => 
           {  
            column.For(x => x.Title).Named("Título");
            column.For(x => x.Description).Named("Descrição"); 
            column.For(x => x.RegisterDate.ToString("dd/MM/yyyy")).Named("Data de Cadastro");
            column.For(x => x.Subjects.SelectMany(s => s.Comments).Count()).Named("Comentários");
            column.For(x => x.AcademicPerson.Name).Named("Autor");
           }).Attributes(Style =>  "width:100%").Empty("Sem resultados")
        %>
    </div>
    <br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
</asp:Content>
